Left Termination of the query pattern p_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

p(X, g(X)).
p(X, f(X)) :- p(X, g(Y)).

Queries:

p(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
p_in: (b,f) (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U1_ga(x1, x2)  =  U1_ga(x1, x2)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
g(x1)  =  g
p_out_gg(x1, x2)  =  p_out_gg
f(x1)  =  f(x1)
U1_gg(x1, x2)  =  U1_gg(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U1_ga(x1, x2)  =  U1_ga(x1, x2)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
g(x1)  =  g
p_out_gg(x1, x2)  =  p_out_gg
f(x1)  =  f(x1)
U1_gg(x1, x2)  =  U1_gg(x2)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

P_IN_GA(X, f(X)) → U1_GA(X, p_in_gg(X, g(Y)))
P_IN_GA(X, f(X)) → P_IN_GG(X, g(Y))
P_IN_GG(X, f(X)) → U1_GG(X, p_in_gg(X, g(Y)))
P_IN_GG(X, f(X)) → P_IN_GG(X, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U1_ga(x1, x2)  =  U1_ga(x1, x2)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
g(x1)  =  g
p_out_gg(x1, x2)  =  p_out_gg
f(x1)  =  f(x1)
U1_gg(x1, x2)  =  U1_gg(x2)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U1_GA(x1, x2)  =  U1_GA(x1, x2)
P_IN_GG(x1, x2)  =  P_IN_GG(x1, x2)
U1_GG(x1, x2)  =  U1_GG(x2)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN_GA(X, f(X)) → U1_GA(X, p_in_gg(X, g(Y)))
P_IN_GA(X, f(X)) → P_IN_GG(X, g(Y))
P_IN_GG(X, f(X)) → U1_GG(X, p_in_gg(X, g(Y)))
P_IN_GG(X, f(X)) → P_IN_GG(X, g(Y))

The TRS R consists of the following rules:

p_in_ga(X, g(X)) → p_out_ga(X, g(X))
p_in_ga(X, f(X)) → U1_ga(X, p_in_gg(X, g(Y)))
p_in_gg(X, g(X)) → p_out_gg(X, g(X))
p_in_gg(X, f(X)) → U1_gg(X, p_in_gg(X, g(Y)))
U1_gg(X, p_out_gg(X, g(Y))) → p_out_gg(X, f(X))
U1_ga(X, p_out_gg(X, g(Y))) → p_out_ga(X, f(X))

The argument filtering Pi contains the following mapping:
p_in_ga(x1, x2)  =  p_in_ga(x1)
p_out_ga(x1, x2)  =  p_out_ga(x2)
U1_ga(x1, x2)  =  U1_ga(x1, x2)
p_in_gg(x1, x2)  =  p_in_gg(x1, x2)
g(x1)  =  g
p_out_gg(x1, x2)  =  p_out_gg
f(x1)  =  f(x1)
U1_gg(x1, x2)  =  U1_gg(x2)
P_IN_GA(x1, x2)  =  P_IN_GA(x1)
U1_GA(x1, x2)  =  U1_GA(x1, x2)
P_IN_GG(x1, x2)  =  P_IN_GG(x1, x2)
U1_GG(x1, x2)  =  U1_GG(x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 0 SCCs with 4 less nodes.